const { resolve } = require('path')

/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  swcMinify: true,
  webpack: config => {
    config.resolve.alias['@'] = resolve(__dirname)
    config.resolve.alias['~/api'] = resolve(__dirname, './api')
    config.resolve.alias['~/util'] = resolve(__dirname, './util')
    config.resolve.alias['~/components'] = resolve(__dirname, './components')
    return config
  },
  images: {
    remotePatterns: [
      {
        protocol: 'https',
        hostname: '*.byteimg.com'
      }
    ]
  }
}

module.exports = nextConfig
